package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.mappers.SoulQuestionMapper;
import com.tanhua.model.domain.SoulQuestion;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author fff
 * @date 2021/12/11 13:27
 **/
@DubboService
public class SoulQuestionApiImpl implements SoulQuestionApi{


    @Autowired
    private SoulQuestionMapper soulQuestionMapper;
    @Override
    public String findById(String questionId) {

        QueryWrapper<SoulQuestion> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("id",questionId);


        SoulQuestion soulQuestion = soulQuestionMapper.selectOne(queryWrapper);

        return soulQuestion.getQuestionnaireId();
    }
}
